{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d85ecf91",
   "metadata": {},
   "source": [
    "# 本周学习内容"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2af1729f",
   "metadata": {},
   "source": [
    "## 1. 准备工作\n",
    "### 1. 安装配置python环境\n",
    "> 1. 什么是绝对路径和相对路径\n",
    "> 2. 配置环境"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "09c410cc",
   "metadata": {},
   "source": [
    "## 2. 回顾：Github Desktop 如何实现本地与云端的连接\n",
    "> 1. 克隆Gitte的仓库URL，到本地的制定文件路径\n",
    "> 2. 上传本地笔记到Gitte仓库"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8b6b8dbb",
   "metadata": {},
   "source": [
    "## 3. 本周重点知识（jupyter notebook）\n",
    "> 1. 什么是IDE？（即集成开发环境）\n",
    "> 2. 如何打开jupyter notebook？\n",
    ">> 1. cmd\n",
    ">> 2. cd指定目录下\n",
    ">> 3. 输入jupyter noteboo"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a6782438",
   "metadata": {},
   "source": [
    "# 2. 模块（工具箱-不需要知道怎么做的，只需要会用就好了）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b03f7d25",
   "metadata": {},
   "source": [
    "## 1. 标准库（python团队自己开发出来的，想着如果有人使用这门编程语言的话，常用的一些功能已经准备好了）\n",
    "> 1. 使用标准库的方法，import模块名称\n",
    "> 2. 标准库的库\n",
    "## 2. 开源模块（anconda为例）\n",
    "> 1. 开源模块\n",
    "## 3. 自定义模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "51617a2a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n"
     ]
    }
   ],
   "source": [
    "print(\"hello world\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "1193120c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8fe034bf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=9, tm_mday=8, tm_hour=10, tm_min=19, tm_sec=18, tm_wday=3, tm_yday=251, tm_isdst=0)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.localtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "eae81550",
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'apple'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "Input \u001b[1;32mIn [5]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mapple\u001b[39;00m\n",
      "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'apple'"
     ]
    }
   ],
   "source": [
    "import apple"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8f2d54d4",
   "metadata": {},
   "outputs": [],
   "source": [
    "from datetime import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7a5f0e8c",
   "metadata": {},
   "outputs": [],
   "source": [
    "odds=[1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "74b69423",
   "metadata": {},
   "outputs": [],
   "source": [
    "right_this_minute = datetime.todaya().minute"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fd7e701a",
   "metadata": {},
   "outputs": [],
   "source": [
    "if right_this_minute in odds:\n",
    "    print(\"This minute seems a little odd.\")\n",
    "    else:\n",
    "        print(\"Not an odd minute\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "211226b3",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "8770aacb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'win32'"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sys.platform"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "dd4e54bb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]\n"
     ]
    }
   ],
   "source": [
    "print(sys.version)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "19d3db23",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "D:\\2022-2023-01\\python\\week 02\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "print(os.path.abspath(' . '))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "23f05315",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'D:\\\\2022-2023-01\\\\python\\\\week 02'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "571265ba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "environ{'ALLUSERSPROFILE': 'C:\\\\ProgramData',\n",
       "        'APPDATA': 'C:\\\\Users\\\\LinHan\\\\AppData\\\\Roaming',\n",
       "        'COMMONPROGRAMFILES': 'C:\\\\Program Files\\\\Common Files',\n",
       "        'COMMONPROGRAMFILES(X86)': 'C:\\\\Program Files (x86)\\\\Common Files',\n",
       "        'COMMONPROGRAMW6432': 'C:\\\\Program Files\\\\Common Files',\n",
       "        'COMPUTERNAME': 'LAPTOP-EH847S05',\n",
       "        'COMSPEC': 'C:\\\\Windows\\\\system32\\\\cmd.exe',\n",
       "        'DRIVERDATA': 'C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData',\n",
       "        'FPS_BROWSER_APP_PROFILE_STRING': 'Internet Explorer',\n",
       "        'FPS_BROWSER_USER_PROFILE_STRING': 'Default',\n",
       "        'HOMEDRIVE': 'C:',\n",
       "        'HOMEPATH': '\\\\Users\\\\LinHan',\n",
       "        'INTEL_DEV_REDIST': 'C:\\\\Program Files (x86)\\\\Common Files\\\\Intel\\\\Shared Libraries\\\\',\n",
       "        'LOCALAPPDATA': 'C:\\\\Users\\\\LinHan\\\\AppData\\\\Local',\n",
       "        'LOGONSERVER': '\\\\\\\\LAPTOP-EH847S05',\n",
       "        'MIC_LD_LIBRARY_PATH': 'C:\\\\Program Files (x86)\\\\Common Files\\\\Intel\\\\Shared Libraries\\\\compiler\\\\lib\\\\mic',\n",
       "        'NUMBER_OF_PROCESSORS': '8',\n",
       "        'ONEDRIVE': 'C:\\\\Users\\\\LinHan\\\\OneDrive',\n",
       "        'ONEDRIVECONSUMER': 'C:\\\\Users\\\\LinHan\\\\OneDrive',\n",
       "        'OS': 'Windows_NT',\n",
       "        'PATH': 'C:\\\\Program Files (x86)\\\\Common Files\\\\Intel\\\\Shared Libraries\\\\redist\\\\intel64\\\\compiler;C:\\\\Windows\\\\system32;C:\\\\Windows;C:\\\\Windows\\\\System32\\\\Wbem;C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\Windows\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files (x86)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA Corporation\\\\NVIDIA NvDLISR;D:\\\\Users\\\\pc\\\\anaconda3;D:\\\\Users\\\\pc\\\\anaconda3\\\\Library\\\\mingw-w64\\\\bin;D:\\\\Users\\\\pc\\\\anaconda3\\\\Library\\\\usr\\\\bin;D:\\\\Users\\\\pc\\\\anaconda3\\\\Library\\\\bin;D:\\\\Users\\\\pc\\\\anaconda3\\\\Scripts;C:\\\\Users\\\\LinHan\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;C:\\\\Users\\\\LinHan\\\\AppData\\\\Local\\\\GitHubDesktop\\\\bin',\n",
       "        'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',\n",
       "        'PROCESSOR_ARCHITECTURE': 'AMD64',\n",
       "        'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 140 Stepping 1, GenuineIntel',\n",
       "        'PROCESSOR_LEVEL': '6',\n",
       "        'PROCESSOR_REVISION': '8c01',\n",
       "        'PROGRAMDATA': 'C:\\\\ProgramData',\n",
       "        'PROGRAMFILES': 'C:\\\\Program Files',\n",
       "        'PROGRAMFILES(X86)': 'C:\\\\Program Files (x86)',\n",
       "        'PROGRAMW6432': 'C:\\\\Program Files',\n",
       "        'PROMPT': '$P$G',\n",
       "        'PSMODULEPATH': 'C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules',\n",
       "        'PUBLIC': 'C:\\\\Users\\\\Public',\n",
       "        'SESSIONNAME': 'Console',\n",
       "        'SYSTEMDRIVE': 'C:',\n",
       "        'SYSTEMROOT': 'C:\\\\Windows',\n",
       "        'TEMP': 'C:\\\\Users\\\\LinHan\\\\AppData\\\\Local\\\\Temp',\n",
       "        'TMP': 'C:\\\\Users\\\\LinHan\\\\AppData\\\\Local\\\\Temp',\n",
       "        'USERDOMAIN': 'LAPTOP-EH847S05',\n",
       "        'USERDOMAIN_ROAMINGPROFILE': 'LAPTOP-EH847S05',\n",
       "        'USERNAME': 'LinHan',\n",
       "        'USERPROFILE': 'C:\\\\Users\\\\LinHan',\n",
       "        'WINDIR': 'C:\\\\Windows',\n",
       "        'WXDRIVE_START_ARGS': '--wxdrive-setting=0 --disable-gpu --disable-software-rasterizer --enable-features=NetworkServiceInProcess',\n",
       "        'ZES_ENABLE_SYSMAN': '1',\n",
       "        'PYDEVD_USE_FRAME_EVAL': 'NO',\n",
       "        'JPY_INTERRUPT_EVENT': '2292',\n",
       "        'IPY_INTERRUPT_EVENT': '2292',\n",
       "        'JPY_PARENT_PID': '2592',\n",
       "        'TERM': 'xterm-color',\n",
       "        'CLICOLOR': '1',\n",
       "        'PAGER': 'cat',\n",
       "        'GIT_PAGER': 'cat',\n",
       "        'MPLBACKEND': 'module://matplotlib_inline.backend_inline'}"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.environ"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "d8f9ee5f",
   "metadata": {},
   "outputs": [],
   "source": [
    "os.getenv('HOME')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "ba2e86c6",
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "77757c84",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(2022, 9, 8)"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "17d5425e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "8"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.today().day"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "30ac71fe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2022-09-08'"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.date.isoformat(datetime.date.today())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "1f1f9a20",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "ae9ce321",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'10:34'"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.strftime(\"%H:%M\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "1837b355",
   "metadata": {},
   "outputs": [],
   "source": [
    "import html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "4dc45d95",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'This HTML fragment contains a &lt;script&gt;script&lt;/script&gt;tag.'"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "html.escape(\"This HTML fragment contains a <script>script</script>tag.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "41a014ba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'I ❤ python &It;standard library>.'"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "html.unescape(\"I ❤ python &It;standard library>.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f7aeffa3",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
